package com.shixi.shixitraining.shixitraining.ui.tabhome.adapter;

import android.content.Context;

import com.shixi.shixitraining.shixitraining.R;
import com.shixi.shixitraining.shixitraining.ui.tabhome.entity.HotJobBean;
import com.shixi.shixitraining.shixitraining.view.recycleview.BaseAdapter;
import com.shixi.shixitraining.shixitraining.view.recycleview.BaseRecycleHolder;

import java.util.List;

/**
 * Created by shenyan on 2018/7/25.
 */

public class OverseasListAdapter extends BaseAdapter<HotJobBean.DataBean.ListsBean> {


    public OverseasListAdapter(Context context, List<HotJobBean.DataBean.ListsBean> data) {
        super(context, data);
    }

    @Override
    public void convert(BaseRecycleHolder holder, HotJobBean.DataBean.ListsBean item, int position) {
     holder.setText(R.id.item_overseas_title,item.getTitle());
     holder.setText(R.id.item_overseas_city,item.getAddress());
     holder.setText(R.id.item_overseas_job,item.getNature());
     holder.setText(R.id.item_overseas_training,item.getDuration());
     holder.setText(R.id.item_overseas_time,item.getTime());
    }

    @Override
    protected int getLayoutId(int viewType) {
        return R.layout.adapter_item_overseas;
    }
}
